
<template tag="以下文档内容为hycli自动生成">
  <div>
  <el-dialog
    v-model="conf.visible"
    :title="title"
    draggable
    align-center="true"
    width="68%"
    :close-on-click-modal="false"

  >
    <el-tabs v-model="conf.selected">
      <el-tab-pane label="详情" name="aaaxt">
<el-row :gutter="24" style="font-size: 0.7rem;">
  <el-col :span="4" class="text-right" style="min-height:26px">标题:</el-col>
  <el-col :span="20" style="min-height:26px" v-html="'<pre>'+view.title+'</pre>'" ></el-col>
  <el-col :span="4" class="text-right" style="min-height:26px">图片:</el-col>
  <el-col :span="8" style="min-height:26px">
  <el-image style="width:48px" :src="view.reproduce_steps_urls" preview-teleported :fit="contain" :preview-src-list="[view.reproduce_steps_urls]" /></el-col>
  <el-col :span="4" class="text-right" style="min-height:26px">研发计划:</el-col>
  <el-col :span="8" v-text="view.plan_id_label" style="min-height:26px" ></el-col>
  <el-col :span="4" class="text-right" style="min-height:26px">相关需求:</el-col>
  <el-col :span="8" v-text="view.related_demand_label" style="min-height:26px" ></el-col>
  <el-col :span="4" class="text-right" style="min-height:26px">开发任务:</el-col>
  <el-col :span="8" v-text="view.dev_task_label" style="min-height:26px" ></el-col>
  <el-col :span="4" class="text-right" style="min-height:26px">测试任务:</el-col>
  <el-col :span="8" v-text="view.test_task_label" style="min-height:26px" ></el-col>
  <el-col :span="4" class="text-right" style="min-height:26px">等级:</el-col>
  <el-col :span="8" v-text="view.bug_level_label" style="min-height:26px" :class="$js.page.colorful(view.bug_level,'bug_level')" ></el-col>
  <el-col :span="4" class="text-right" style="min-height:26px">缺陷分类:</el-col>
  <el-col :span="8" v-text="view.bug_type_label" style="min-height:26px" :class="$js.page.colorful(view.bug_type,'bug_type')" ></el-col>
  <el-col :span="12"></el-col>
  <el-col :span="4" class="text-right" style="min-height:26px">重现步骤:</el-col>
  <el-col :span="20" style="min-height:26px" v-html="'<pre>'+view.reproduce_steps+'</pre>'" ></el-col>
  <el-col :span="4" class="text-right" style="min-height:26px">提交时间:</el-col>
  <el-col :span="8" v-text="view.create_date||'-'" style="min-height:26px" ></el-col>
  <el-col :span="4" class="text-right" style="min-height:26px">发现时间:</el-col>
  <el-col :span="8" v-text="view.found_date||'-'" style="min-height:26px" ></el-col>
  <el-col :span="4" class="text-right" style="min-height:26px">状态:</el-col>
  <el-col :span="8" v-text="view.bug_status_label" style="min-height:26px" :class="$js.page.colorful(view.bug_status,'bug_status')" ></el-col>
  <el-col :span="4" class="text-right" style="min-height:26px">指派:</el-col>
  <el-col :span="8" v-text="view.assigned_to_label" style="min-height:26px" ></el-col>
  <el-col :span="4" class="text-right" style="min-height:26px">创建人:</el-col>
  <el-col :span="8" v-text="view.creator_label" style="min-height:26px" ></el-col>
  <el-col :span="4" class="text-right" style="min-height:26px">激活次数:</el-col>
  <el-col :span="8" v-text="view.activation_count||'-'" style="min-height:26px" ></el-col>
  <el-col :span="4" class="text-right" style="min-height:26px">操作系统:</el-col>
  <el-col :span="8" v-text="view.os||'-'" style="min-height:26px" ></el-col>
  <el-col :span="4" class="text-right" style="min-height:26px">浏览器:</el-col>
  <el-col :span="8" v-text="view.browser||'-'" style="min-height:26px" ></el-col>
  <el-col :span="4" class="text-right" style="min-height:26px">解决时间:</el-col>
  <el-col :span="8" v-text="view.resolved_date||'-'" style="min-height:26px" ></el-col>
  <el-col :span="4" class="text-right" style="min-height:26px">分配时间:</el-col>
  <el-col :span="8" v-text="view.assigned_date||'-'" style="min-height:26px" ></el-col>
  <el-col :span="4" class="text-right" style="min-height:26px">归档状态:</el-col>
  <el-col :span="8" v-text="view.archive_status_label" style="min-height:26px" :class="$js.page.colorful(view.archive_status,'archive_status')" ></el-col>
  <el-col :span="4" class="text-right" style="min-height:26px">业务线:</el-col>
  <el-col :span="8" v-text="view.lob_id_label" style="min-height:26px" ></el-col>
</el-row>
      </el-tab-pane>
    </el-tabs>
    <template #footer>
      <span style="height: 60px"> </span>
    </template>
  </el-dialog>
</div>
</template>
<script>
import gantt from "@/views/cmpnts/gantt.vue"
export default {
   components: {
    gantt,
  },
  data() {
    return {
        conf:{
        visible:false,
        
        selected:"aaaxt",
      },
      title:"缺陷管理详情",
      form:{},
      view: {
        title:"",
        reproduce_steps_urls:"",
        plan_id:"",
        related_demand:"",
        dev_task:"",
        test_task:"",
        bug_level:"",
        bug_type:"",
        reproduce_steps:"",
        create_date:"",
        found_date:"",
        bug_status:"",
        assigned_to:"",
        creator:"",
        activation_count:"",
        os:"",
        browser:"",
        resolved_date:"",
        assigned_date:"",
        archive_status:"",
        lob_id:"",
        },
      }
  },
  methods: {
  show_cmpnt_aaaxs(fm = {}){
    let form = Object.assign({},this.form)
    form = Object.assign(form,fm)
    form.bug_level = "3"
    form.bug_type = "1"
    this.$refs.cmpnt_aaaxs.show(form)
  },
  show_cmpnt_aaaxq(fm = {}){
    let form = Object.assign({},this.form)
    form = Object.assign(form,fm)
    this.$refs.cmpnt_aaaxq.show(form)
  },
  show_cmpnt_aaaxo(fm = {}){
    let form = Object.assign({},this.form)
    form = Object.assign(form,fm)
    this.$refs.cmpnt_aaaxo.show(form)
  },
  show_cmpnt_aaaxp(fm = {}){
    let form = Object.assign({},this.form)
    form = Object.assign(form,fm)
    form.bug_id = (this.bcheck||[]).join(",")
    this.$refs.cmpnt_aaaxp.show_aaaxp(form)
  },
  show_cmpnt_aaaxr(fm = {}){
    let form = Object.assign({},this.form)
    form = Object.assign(form,fm)
    this.$refs.cmpnt_aaaxr.show_aaaxr(form)
  },
 show(form) {
    this.conf.visible = true
    this.form = form
   let that = this;
   this.$theia.http
      .get("/ws/test/bug",form)
      .then((res) => {
        let item = Object.assign({}, res)
        item.plan_id_label = that.$theia.enum.getName("dev_plan",item.plan_id)
        item.related_demand_label = that.$theia.enum.getName("prod_requirement",item.related_demand)
        item.dev_task_label = that.$theia.enum.getName("dev_task",item.dev_task)
        item.test_task_label = that.$theia.enum.getName("test_task",item.test_task)
        item.bug_level_label = that.$theia.enum.getName("bug_level",item.bug_level)
        item.bug_type_label = that.$theia.enum.getName("bug_type",item.bug_type)
        item.bug_status_label = that.$theia.enum.getName("bug_status",item.bug_status)
        item.assigned_to_label = that.$theia.enum.getName("dmaster",item.assigned_to)
        item.creator_label = that.$theia.enum.getName("user_account",item.creator)
        item.archive_status_label = that.$theia.enum.getName("bug_tab",item.archive_status)
        item.lob_id_label = that.$theia.enum.getName("my_business_line",item.lob_id)  
        item.title = (item.title||"")  
        item.reproduce_steps_urls = (item.reproduce_steps_urls||"")
        item.create_date = that.$theia.str.dateFormat(item.create_date,'MM/dd HH:mm')
        item.found_date = that.$theia.str.dateFormat(item.found_date,'MM/dd HH时')
        item.resolved_date = that.$theia.str.dateFormat(item.resolved_date,'MM/dd HH时')
        that.view = item
      })
      .catch((res) => {
        let code = res.response.status;
        let msg = `缺陷管理查询失败(${code})`;
        that.$notify.error({ title: "失败", message: msg, duration: 5000 });
      });
  },
  },
};
</script>
<style scoped>
/deep/.el-step__title{
    font-size: 0.8rem;
}
.steps{
  margin-top:8px;
  margin-bottom:  16px;
}
</style>